package com.java.learn;
public class reverseString { 
    public static void main(String[ ] args) { 
        System.out.println(reverse("big brown fox")); 
        System.out.println(reverse(""));       
    }
  
    public static String reverse(String input) { 
        if(input == null || input.length( ) == 0){ 
            return input; 
        }else{
        	return new StringBuffer(input).reverse().toString();
        }
        //return new StringBuilder(input).reverse( ).toString( );
 
    }
 
}